/*
 * main.cpp
 *
 *  Created on: 13.11.2011
 *      Author: Pavel Sinay
 */

#include <iostream>

#include "SerializableA.h"
#include "SerializableC.h"
#include "SerializePool.h"
#include "ReaderA.h"
#include "ReaderB.h"

int main(int argc, char *argv[]) {
	std::cout << "Serialization sample" << std::endl;

	SerializePool ser_pool;
	SerializableA ser_a;
	SerializableB ser_b;
	SerializableC ser_c;

	ReaderA reader_a;
	ReaderB reader_b;

	ser_a.setA(123);
	ser_b.setB(666.666);
	ser_c.setC(13);
	//ser_c.set
	ser_pool.deserialize(ser_a.serialize());
	ser_pool.deserialize(ser_b.serialize());
	ser_pool.deserialize(ser_c.serialize());
	reader_a.readAObjects();
	reader_b.readBObjects();

//	ser_a.setA(123);
//	Serializable *ser = &ser_a;
//	std::string s = ser_a.serialize();
//	std::cout << "test" << std::endl;
//	ser->deserialize(s);

	return 0;
}
